]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
calendar: Remove ability to hide events
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 17 Dec 2018 17:58:57 +0000 (18:58 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Tue, 22 Jan 2019 21:35:52 +0000 (21:35 +0000)
The functionality is no longer exposed, so remove it altogether.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/262

js/ui/calendar.js

index 7ff98dfcf7e922b91b85838388547364d91096d1..1927e8cdbb9c5f20e6a8b40da6cfc6c6b23f9878 100644 (file)
@@ -117,9 +117,6 @@ var EmptyEventSource = new Lang.Class({
     destroy() {
     },
 
-    ignoreEvent(event) {
-    },
-
     requestRange(begin, end) {
     },
 
@@ -185,14 +182,6 @@ var DBusEventSource = new Lang.Class({
         this.isLoading = false;
         this.isDummy = false;
 
-        this._ignoredEvents = new Map();
-
-        let savedState = global.get_persistent_state('as', 'ignored_events');
-        if (savedState)
-            savedState.deep_unpack().forEach(eventId => {
-                this._ignoredEvents.set(eventId, true);
-            });
-
         this._initialized = false;
         this._dbusProxy = new CalendarServer();
         this._dbusProxy.init_async(GLib.PRIORITY_DEFAULT, null, (object, result) => {
@@ -305,16 +294,6 @@ var DBusEventSource = new Lang.Class({
         }
     },
 
-    ignoreEvent(event) {
-        if (this._ignoredEvents.get(event.id))
-            return;
-
-        this._ignoredEvents.set(event.id, true);
-        let savedState = new GLib.Variant('as', [...this._ignoredEvents.keys()]);
-        global.set_persistent_state('ignored_events', savedState);
-        this.emit('changed');
-    },
-
     requestRange(begin, end) {
         if (!(_datesEqual(begin, this._lastRequestBegin) && _datesEqual(end, this._lastRequestEnd))) {
             this.isLoading = true;
@@ -331,9 +310,6 @@ var DBusEventSource = new Lang.Class({
         for(let n = 0; n < this._events.length; n++) {
             let event = this._events[n];
 
-            if (this._ignoredEvents.has(event.id))
-                continue;
-
             if (_dateIntervalsOverlap (event.date, event.end, begin, end)) {
                 result.push(event);
             }